package com.jd.jobkeeper.client;

public class Node {

    private String host;
    private int port;

    public Node(String host, int port) {
        this.host = host;
        this.port = port;
    }

    public Node(String s) {
        String arr[] = s.split(":");
        this.host = arr[0];
        this.port = Integer.valueOf(arr[1]);
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    @Override
    public String toString() {
        return host + ":" + port;
    }
}
